
fn main() {
    // variables can be type annotated.
    let logical: bool = true;

    let a_float: f64 = 1.; // Regular annotation
    let an_integer = 5i32; // Suffix annotation

    // or a default will be used.
    let default_float = 3.; // `f64`
    let default_integer = 7; // `i32`

    // a type can also be inferred from the context
    let mut inferred_type = 12; // in this line, the type is i32, but type i64 is inferred from the next line.
    inferred_type = 4294967296i64; 

    // a mutable variable's value can be changed.
    let mut mutable = 12; // mutable `i32`
    mutable = 21; // re-assignment

    let mut mutable = 12; // mutable `i32`
    mutable = 21; // re-assignment

    // Error! the type of a variable cannot be changed
    // mismatched types
    // mutable = true;

    // variables can be overwritten with shadowing
    let mutable = true;
}